package com.kczd.entity;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;

public class OrderNoPaidDao {
	private List<Location> locations=new ArrayList<Location>();

	public OrderNoPaidDao(){

	}
	public List<Location> getLocations(){
		//对集合中元素进行排序，然后再返回
		Collections.sort(locations, new Comparator<Location>() {

			@Override
			public int compare(Location lhs, Location rhs) {
				// 通过比较日期进行排序
				//return lhs.getDate().compareTo(rhs.getDate());//这是升序
				return rhs.getDatetime().compareTo(lhs.getDatetime());
			}
		});

		return locations;



	}
}
